﻿using System.Linq;

namespace cludg.Services.Security
{
	public static class AuthorizationHelper
	{
		public static Permissions.Permission PermissionByName(this IAuthorization authorization, string name)
		{
			return authorization.Permissions.FirstOrDefault(x => x.Name == name);
		}
	}
}
